<style>
	.btn1{
		position: relative;
		left: 75px;
	}
	.btn2{
		position: relative;
		left: 83px;
	}
	.btn3{
		position: relative;
		left: 91px;
	}	
</style>
<div id="content">
<div class="blank10">
</div>
<%= error_messages_for :user_info %>
<!--<div id="title1" align="left">
    <h1 class="padding01">User Info Modify</h1>
</div>-->
<div>
<%=image_tag "ht_tb_pic.jpg", :width=>'100%', :height=>'61' %>
</div>
<div id="ht_content">
<div id="Tab1">
    <span></span>
    <% form_for @user_info,:url=>{:controller=>'management_yui', :action=>'update_userinfo'}, :html =>{:id =>"user_info_edit_form" } do |infof| %>
    <div class="Contentbox">
        <div id="con_one_1" class="hover">
            <div class="reginfo">
                <!--user-->
				<% fields_for @user do |f| %>
                <div class="titleName">
                    姓名：
                </div>
                <%= @user.name %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    昵称：
                </div>
                <%= f.text_field :nickname,:class=>'required' %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    Email：
                </div>
                <%= f.text_field :email,:class=>'validate-email' %>
                <div class="blank14">
                </div>
				<div>
				<%= f.hidden_field :id%>
				</div>				
				<%end %>
				
                <!--User info-->
                <div class="titleName">
                    地址：
                </div>
                <%= infof.text_field :address %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    邮编：
                </div>
                <%= infof.text_field :postalcode %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    电话：
                </div>
                <%= infof.text_field :telephone %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    相片：
                </div>
                <%= infof.text_field :picture %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    个性图片：
                </div>
                <%= infof.text_field :idiograph %>
                <div class="blank14">
                </div>
                <div class="titleName">
                    城市：
                </div>
                <%= infof.select(:city_id, DCity.find(:all).map {|c| [ c.city_name, c.id ] },{:prompt => "请选择城市"}) %>
                <div class="blank14">
                </div>

                <div>
                	<div class="btns btn1"><%= link_to '<span>修改</span> ','javascript:document.forms[0].submit(); ' %></div>
					<div class="btns btn2"><%= link_to '<span>取消</span> ', {:controller=>"management_yui",:action=>"main",:id=>session[:user_id]} %></div>
					<div class="btns btn3"><%= link_to '<span>下一步</span> ', {:controller=>"management_yui",:action=>"detail",:id=>@user.id} %></div>
                </div>
               										
            </div>
        </div>
    </div>
	
    <% end %>

	<% 
@user_info_errors=(session[:user_info_errors]!=nil)? session[:user_info_errors]:@user_info
%>
<%= error_messages_for :object=>[@user_info_errors] %>
<% session[:user_info_errors]=nil %>
</div>
</div>
</div>
<script type="text/javascript">	
	new Validation('user_info_edit_form', {immediate : true,stopOnFirst:true});
</script>
